//推荐接口
import request from "./http";

// 获取用户详情
export function getUserDetail(params) {
    return request({
        url: "/user/detail?",
        method: "get",
        params
    })
}

//获取账号信息
export function getUserAccount() {
    return request({
        url: "/user/account",
        method: "get",
    })
}

//获取用户信息 , 歌单，收藏，mv, dj 数量
export function getUserSubcount() {
    return request({
        url: "/user/subcount",
        method: "get",
    })
}

//收藏和创建歌单列表
export function getUserPlaylist(params) {
    return request({
        url: "/user/playlist?",
        method: "get",
        params
    })
}

//收藏MV列表
export function getMvSublist() {
    return request({
        url: "/mv/sublist",
        method: "get",
    })
}
//获取MV数据
export function getMvDetail(params) {
    return request({
        url: "/mv/detail?",
        method: "get",
        params
    })
}

//获取MV地址
export function getMvUrl(params) {
    return request({
        url: "/mv/url?",
        method: "get",
        params
    })
}

//登录状态
export function getLoginStatus() {
    return request({
        url: "/login/status",
        method: "get",
    })
}

// 退出登入
export function getLogin() {
    return request({
        url: "/login",
        method: "get",
    })
}

// mv评论
export function getCommentmv(params) {
    return request({
        url: "/comment/mv",
        method: "get",
        params
    })
}

//发送评论
export function getComment({ t, type, id, content }) {
    return request({
        url: "/comment",
        method: "get",
        params: {
            t,
            type,
            id,
            content,
        }
    })
}

//收藏mv
export function getMvsub({ t, mvid }) {
    return request({
        url: "/mv/sub",
        method: "get",
        params: {
            t,
            mvid,
        }
    })
}

//mv评论点赞
export function getCommentLike({ t, cid, id }) {
    return request({
        url: "/comment/like",
        method: "get",
        params: {
            t,
            cid,
            type: 1,
            id,
        }
    })
}

//全部mv
export function getMvAll({ limit }) {
    return request({
        url: "/mv/all",
        method: "get",
        params: {
            area: "内地",
            type: "全部",
            order: "最热",
            limit
        }
    })
}

//获取用户关注列表
export function getUserFollows({ uid }) {
    return request({
        url: "/user/follows",
        method: "get",
        params: {
            uid
        }
    })
}

//获取用户粉丝列表
export function getUserFolloweds({ uid }) {
    return request({
        url: "/user/followeds",
        method: "get",
        params: {
            uid
        }
    })
}